﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Inspinia_MVC5.Models
{
    /// <summary>
    /// 图书表
    /// </summary>
    public class Book
    {

        public int ID { get; set; }

        [Required]
        [StringLength(100)]
        [Display(Name = "书名")]

        public string BookName { get; set; }

        [Required]
        [StringLength(50)]
        [Display(Name = "ISBN号")]

        public string BokISBN { get; set; }

        [Required]
        [StringLength(50)]
        [Display(Name = "作者")]

        public string BookAuthor { get; set; }

        [Required]
        [StringLength(50)]
        [Display(Name = "出版社")]
        public string BookPress { get; set; }

        [StringLength(100)]
        [Display(Name = "图片路径")]
        public string BookPic { get; set; }
        [Column(TypeName = "money")]
        [Display(Name = "价格")]
        [Required]


        public decimal BookMoney { get; set; }

        [Column(TypeName = "money")]
        [Display(Name = "滞纳金")]
        [Required]

        public decimal BookOverdue { get; set; }

        [Display(Name = "状态")]
        [Required]

        public int Status { get; set; }
        [Display(Name = "库存数量")]
        [Required]


        public int BookNum { get; set; }

        [Column(TypeName = "text")]
        [Display(Name = "详情")]

        public string BookDesc { get; set; }
        [Display(Name = "图书类别")]

        public int BookTypeId { get; set; }
        [Display(Name = "借阅量")]

        public int? BookJieYueLiang { get; set; }

        public virtual BookType BookType { get; set; }

        public virtual ICollection<Borrow> Borrow { get; set; }
    }
}